package com.wardrobe.soa.api.person_center;

import com.wardrobe.soa.api.home.HomeInfoResponse;
import com.wardrobe.soa.common.ApiResult;
import com.wardrobe.soa.utils.CommonConsant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018/11/19.
 */
@RestController
@RequestMapping("/api/person")
public class PersonCenterController {
    private static final Logger logger = LoggerFactory.getLogger(PersonCenterController.class);
    @Autowired
    private PersonCenterService personCenterService;

    @RequestMapping("/center")
    public ApiResult personCenter(long userId){
        try {
            boolean flag = personCenterService.isShop(userId);
            return new ApiResult(CommonConsant.successCode,CommonConsant.success,CommonConsant.successMsg,flag);
        }catch (Exception e){
            logger.error("personCenter_err",e);
        }
        return new ApiResult(CommonConsant.serverFailedCode,CommonConsant.failed,CommonConsant.serverFailedMsg,"");
    }
}
